class Person {
    #name
    #age

    constructor(name, age) {
        this.#name = name;
        this.#age = age;
    }

    get age() {
        return this.#age;
    }
}

const person = new Person('Tom', 29);
console.log(person.age)
